<?php if (!defined('THINK_PATH')) exit();?>
<!doctype html>
<html>
<head>
<title>商户管理系统</title>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta name="MobileOptimized" content="240" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
  <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
  <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
  <meta content="no-cache" http-equiv="pragma">
  <meta content="0" http-equiv="expires">
  <meta content="telephone=no, address=no" name="format-detection">
  <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<!-- Mobile Devices Support @end -->
<link rel="stylesheet" type="text/css" href="/agent_admin/Public/home/css/public.css" media="all" />
<link rel="stylesheet" type="text/css" href="/agent_admin/Public/home/css/home.css" media="all" />
<script src="/agent_admin/Public/home/js/jquery-2.1.0.min.js"></script>
</head>

<body class="body" style="padding-bottom:0px;background-size:120%;">
	<div class="page_top_box">
    <center>
        <div class="page_top" style="margin-bottom:50px;height:97px;" onclick="location.reload()">
            <div class="pg_name" style="height:20px;">商户管理系统</div>	
			<?php	foreach ($message as $v){ ?>
		<?php } ?>
		<div>
            <div class="my_gold" style="margin-bottom:30px;font-size:1.0em;font-weight:bold">商 户 I D：<span><?php echo $User_Profile['accounts'] ?></span></div>
			
            <div class="my_gold" style="margin-top:30px;font-size:1.0em;font-weight:bold">钻石数量：<span><?php echo $User_Profile['gems'] ?></span>&nbsp; &nbsp; &nbsp; &nbsp;</div>
			<div  style="font-size:1.0em;font-weight:bold;margin-left:40%;margin-top:20px;">手机号码：<span style="font-size:1.2em;font-weight:bold;color:#f00;"><?php echo $User_Profile['phone'] ?></span></div>
            <div class="my_out"> 
			<a style="width:100px;height:28px;margin-top:5%;" onclick="if(!confirm('是否退出')){return false;}" style="color:red" href="<?php  echo U('Login/logint?userid=1') ?>">退出</a></div>
        </div>
        </div>
    </center>
    </div>
        <div class="marq_info" style="margin-top:36px;">

    	<marquee scrollamount="5" scrolldelay="100" onMouseOut="this.start()" onMouseOver="this.stop()">
        	<span style="color:red"><?php  echo $message['content'] ?></span>        </marquee>
    </div>
    
    <div class="my_total" style="margin-top:0px;">    
    	 <div style="line-height:0px;margin-top:-7px;">我的代理数量<span><?php echo $underling ?></span>人</div>				<!--此处有单独一张记录表  冲的总和 -->
        <div style="line-height:0px;margin-top:-7px;margin-left:8%;width:42%">我今日充值量<span><?php  if($sum==""){ echo '0'; } if($sum!=""){ echo $sum ; } ?></span>个</div>        
    </div>
    <ul class="h_nav_btn" style="margin-top:-36px;">
    	<li>
        	<div style="background-color:#0C9;">            
            <a href="searchplayer.html">
        		<img src="/agent_admin/Public/home/images/home_btn_ico10.png" /><br /><span class="t">玩家充钻</span>
            </a>
            </div>
        </li>
        <li>
        	<div style="background-color:#06923b;">            
            <a  href="creatuser.html" onclick="return checkAgent()">        		<img src="/agent_admin/Public/home/images/home_btn_ico11.png" /><br /><span class="t">添加代理</span>
            </a>
            </div>
        </li>
		        <li>
        	<div style="background-color:#2198db;">            
            <a href="myadmin.html">
        		<img src="/agent_admin/Public/home/images/home_btn_ico3.png" /><br /><span class="t">我的代理</span>
            </a>
            </div>
        </li>
		<li>
        	<div style="background-color:#00D500;">            
            <a href="playercharge.html">
        		<img src="/agent_admin/Public/home/images/home_btn_ico8.png" /><br /><span class="t">赠送玩家记录</span>
            </a>
            </div>
        </li>
		<li>
        	<div style="background-color:#a551ff;">            
            <a href="agentcharge.html">
        		<img src="/agent_admin/Public/home/images/home_btn_ico4.png" /><br /><span class="t">代理买钻记录</span>
            </a>
            </div>
        </li>	
        <li>
        	<div style="background-color:#fc9e02;">       
            <a href="buygold.html">
        		<img src="/agent_admin/Public/home/images/home_btn_ico5.png" /><br /><span class="t">我的购钻记录</span>
            </a>
            </div>
        </li>
         <li>
        	<div style="background-color:#e02b58;">            
            <a href="myinfo.html">
        		<img src="/agent_admin/Public/home/images/home_btn_ico2.png" /><br /><span class="t">我的信息</span>
            </a>
            </div>
        </li>		
    	<li>
        	<div style="background-color:#dc2227;">            
            <a href="policy.html">
        		<img src="/agent_admin/Public/home/images/home_btn_ico1.png" /><br /><span class="t">代理政策</span>
            </a>
            </div>
        </li>
        <li>
        	<div style="background-color:#00B500;">            
            <a href="<?php echo U('Index/reward') ?>">
        		<img src="/agent_admin/Public/home/images/home_btn_ico6.png" /><br /><span class="t">我的返利</span>
            </a>
            </div>
        </li>
       

        	
			      
			<?php  if($User_Profile['agencylv']==0) { echo '  <li><div style="background-color:#603;">      <a href="setnotice.html">
							<img src="/agent_admin/Public/home/images/home_btn_ico9.png" /><br /><span class="t">消息通知</span>
					</a></div> </li>'; } if($User_Profile['agencylv']>1) { echo ''; } ?>
			<?php  if($User_Profile['agencylv']==0) { echo ' <li><div style="background-color:#00F000;">  
						<a href="policyedit.html">
							<img src="/agent_admin/Public/home/images/home_btn_ico7.png" /><br /><span class="t">政策管理</span>
						</a>
					 </div></li>'; } if($User_Profile['agencylv']>1) { echo ''; } ?>
           
		        <li>
        	<div style="background-color:#423345;">            
            <a href="<?php echo U('Index/payoff') ?>">
        		<img src="/agent_admin/Public/home/images/home_btn_ico7.png" /><br /><span class="t">微信充值</span>
            </a>
            </div>
        </li>

            </ul>
    
    <div id="hintbox" class="hint_box">
       <span id="hintmsg"></span>
    </div>
    

    <script type="text/javascript">
		function checkAgent(){
			$.ajax({
				url:"tongzhi.html?ac=ajax.class&do=agnum&agid=544677&" + Math.random(),
				success:function(result){
					if(result == 1)
						 window.location.href = "creatuser.php";
					else
						hintPop("您添加的代理人数已达到上限！");
						
					return false;			
				}
			});
		}
		
		function hintPop(msg){
			$("#hintmsg").html(msg);
			$("#hintbox").css({"opacity": "1", "display": "block"});
			$("#hintbox").animate({"bottom":"80px"}, "last", function(){
				setTimeout(function(){
					$("#hintbox").animate({"opacity": "0"}, "last", function(){
						$("#hintbox").css({"bottom":"0px", "display": "none"});
					});
				}, 2000);
			});
		}
	</script>
</body>
</html>